Skip to content

update e2e tests block numbers#451

Merged
rouzwelt merged 9 commits into
masterfrom
2026-06-17-update-e2e-block-numbers
Jun 17, 2026
Merged

update e2e tests block numbers#451
rouzwelt merged 9 commits into
masterfrom
2026-06-17-update-e2e-block-numbers

Conversation

@rouzwelt

@rouzwelt rouzwelt commented Jun 17, 2026

Copy link
Copy Markdown
Collaborator

Motivation

Solution

Checks

By submitting this for review, I'm confirming I've done the following:

  • made this PR as small as possible
  • unit-tested any new functionality
  • linked any relevant issues or PRs
  • included screenshots (if this involves a front-end change)

Summary by CodeRabbit

  • Tests

    • Updated end-to-end test infrastructure with improved RPC URL configuration and handling.
    • Synchronized test data across multiple blockchain networks with updated block numbers and account configurations.
    • Adjusted test account funding values for blockchain simulation accuracy.
  • Chores

    • Refactored network configuration to use standardized default RPC endpoint resolution.

@rouzwelt rouzwelt self-assigned this Jun 17, 2026
@rouzwelt rouzwelt added the general update A general update to the repo label Jun 17, 2026
@coderabbitai

coderabbitai Bot commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

The PR rewires the DEFAULT_RPC secret through CI and Hardhat forking config (replacing DEFAULT_POLYGON_RPC and removing a pinned block number), then refreshes per-chain fork block numbers and token-holder addresses across seven chains in the e2e test data file, and updates all hardcoded Hardhat balance hex constants plus a BSC-specific ratio1 value in the e2e test suite.

Changes

E2E Test Infrastructure Refresh

Layer / File(s) Summary
DEFAULT_RPC env var wiring
.github/workflows/standard-test.yaml, hardhat.config.ts
CI Run Tests step gains DEFAULT_RPC from secrets; hardhat.config.ts reads it via optional chaining with a polygon fallback, replacing DEFAULT_POLYGON_RPC and dropping the pinned fork blockNumber.
Per-chain fork data updates
test/e2e/data.js
Fork block numbers refreshed for Polygon, Arbitrum, Flare, Ethereum, Base, BSC, and Linea. Token-holder/recipient address lists updated per chain. Base's WLTH token entry and prior Aerodrome Slipstream config replaced; BSC's PAID token commented out with adjusted provider/deposit arrays; Matchain block commented out entirely.
E2E balance constants and BSC ratio logic
test/e2e/e2e.test.js
All hardhat_setBalance values and derived bot.BALANCE/owner-balance constants changed from 0x4563918244F40000 to 0x3635C9ADC5DEA00000 across every v4/v5 test scenario. v5 intra-orderbook ratio1 made chain-conditional: 4000000000000n for BSC, 500000000000000000n otherwise.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title 'update e2e tests block numbers' is partially related to the changeset but does not fully capture the main changes, which extend beyond just block number updates to include RPC configuration changes, environment variable adjustments, test account funding values, and test data modifications. Consider revising the title to better reflect the scope of changes, such as 'Update e2e test configuration and block numbers' or provide more specific details about the RPC and funding adjustments included in this changeset.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch 2026-06-17-update-e2e-block-numbers

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ast-grep (0.43.0)
test/e2e/e2e.test.js

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
test/e2e/data.js (1)

114-140: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Keep positional arrays aligned after token removal.

After commenting out WLTH, the Base config now has 3 active tokens/holders but 4 deposit entries. This silent drift makes token↔deposit mapping fragile and can cause wrong amounts if tokens are toggled again.

Suggested fix
-        ["1", "10000", "10000", "10000"],
+        ["1", "10000", "10000"],
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@test/e2e/data.js` around lines 114 - 140, The Base configuration has a
mismatch between the number of active Token objects and the entries in the
holders and deposit amounts arrays. After commenting out the WLTH token, there
are now 2 active tokens but the holders array and deposit amounts array still
contain 4 entries instead of 2-3. To fix this, remove or comment out the holder
address and corresponding deposit amount entry that was aligned with the
commented-out WLTH token from both the holders array (around
"0xb2cc224c1c9feE385f8ad6a55b4d94E92359DC59" and its peer) and the deposit
amounts array (around ["1", "10000", "10000", "10000"]) to ensure all three
positional arrays have matching lengths and proper token-to-holder-to-amount
mapping.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/standard-test.yaml:
- Around line 68-70: The inline unquoted secret assignment in the run command on
line 68 using TEST_${{ matrix.chain }}_RPC=${{ secrets[env.RPC] }} can break if
the RPC URL contains shell-significant characters. Remove this inline secret
expansion from the run command and instead use the DEFAULT_RPC environment
variable that is already being injected in the env section on line 70. Export
the dynamic variable (TEST_<chain>_RPC) from DEFAULT_RPC within the run command
itself to safely handle special characters in the secret value.

In `@test/e2e/e2e.test.js`:
- Around line 217-221: The hex funding value "0x3635C9ADC5DEA00000" is
duplicated multiple times throughout the test file in both hardhat_setBalance
calls and bot.BALANCE assignments, which can lead to inconsistency if one value
is updated and the other is not. Define a constant at the top of the test file
to hold this hex value, then replace all instances of this hardcoded string with
references to that constant in both the
network.provider.send("hardhat_setBalance", [...]) call and the bot.BALANCE
assignment using ethers.BigNumber.from().

---

Outside diff comments:
In `@test/e2e/data.js`:
- Around line 114-140: The Base configuration has a mismatch between the number
of active Token objects and the entries in the holders and deposit amounts
arrays. After commenting out the WLTH token, there are now 2 active tokens but
the holders array and deposit amounts array still contain 4 entries instead of
2-3. To fix this, remove or comment out the holder address and corresponding
deposit amount entry that was aligned with the commented-out WLTH token from
both the holders array (around "0xb2cc224c1c9feE385f8ad6a55b4d94E92359DC59" and
its peer) and the deposit amounts array (around ["1", "10000", "10000",
"10000"]) to ensure all three positional arrays have matching lengths and proper
token-to-holder-to-amount mapping.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: fecde88c-803f-4dbe-bcd6-a4cab804d49e

📥 Commits

Reviewing files that changed from the base of the PR and between 1bf23b1 and 964cc47.

📒 Files selected for processing (4)
  • .github/workflows/standard-test.yaml
  • hardhat.config.ts
  • test/e2e/data.js
  • test/e2e/e2e.test.js

Comment thread .github/workflows/standard-test.yaml
Comment thread test/e2e/e2e.test.js
@rouzwelt rouzwelt merged commit d25e0b8 into master Jun 17, 2026
12 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

@coderabbitai assess this PR size classification for the totality of the PR with the following criterias and report it in your comment:

S/M/L PR Classification Guidelines:

This guide helps classify merged pull requests by effort and complexity rather than just line count. The goal is to assess the difficulty and scope of changes after they have been completed.

Small (S)

Characteristics:

  • Simple bug fixes, typos, or minor refactoring
  • Single-purpose changes affecting 1-2 files
  • Documentation updates
  • Configuration tweaks
  • Changes that require minimal context to review

Review Effort: Would have taken 5-10 minutes

Examples:

  • Fix typo in variable name
  • Update README with new instructions
  • Adjust configuration values
  • Simple one-line bug fixes
  • Import statement cleanup

Medium (M)

Characteristics:

  • Feature additions or enhancements
  • Refactoring that touches multiple files but maintains existing behavior
  • Breaking changes with backward compatibility
  • Changes requiring some domain knowledge to review

Review Effort: Would have taken 15-30 minutes

Examples:

  • Add new feature or component
  • Refactor common utility functions
  • Update dependencies with minor breaking changes
  • Add new component with tests
  • Performance optimizations
  • More complex bug fixes

Large (L)

Characteristics:

  • Major feature implementations
  • Breaking changes or API redesigns
  • Complex refactoring across multiple modules
  • New architectural patterns or significant design changes
  • Changes requiring deep context and multiple review rounds

Review Effort: Would have taken 45+ minutes

Examples:

  • Complete new feature with frontend/backend changes
  • Protocol upgrades or breaking changes
  • Major architectural refactoring
  • Framework or technology upgrades

Additional Factors to Consider

When deciding between sizes, also consider:

  • Test coverage impact: More comprehensive test changes lean toward larger classification
  • Risk level: Changes to critical systems bump up a size category
  • Team familiarity: Novel patterns or technologies increase complexity

Notes:

  • the assessment must be for the totality of the PR, that means comparing the base branch to the last commit of the PR
  • the assessment output must be exactly one of: S, M or L (single-line comment) in format of: SIZE={S/M/L}
  • do not include any additional text, only the size classification
  • your assessment comment must not include tips or additional sections
  • do NOT tag me or anyone else on your comment

@coderabbitai

coderabbitai Bot commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Tip

For best results, initiate chat on the files or code changes.

SIZE=M

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

general update A general update to the repo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant